package com.he.principles.ISP;

import com.he.principles.ISP.after.MySafetyDoorAfter;
import com.he.principles.ISP.before.MySafetyDoor;

public class SafetyDoorTest {

    public static void main(String[] args) {

        System.out.println("================before");
        MySafetyDoor mySafetyDoor = new MySafetyDoor();
        mySafetyDoor.fireProof();
        mySafetyDoor.waterProof();
        //假如只想要其中一个方法时，就无法实现，所以要对接口进行拆分，使一个类依赖于最小的一个接口上
        System.out.println("================after");
        MySafetyDoorAfter mySafetyDoorAfter = new MySafetyDoorAfter();
        mySafetyDoorAfter.fireProof();
    }
}
